package com.youkeda.dewu.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.youkeda.comment.model.User;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author 刘正星
 * @version 1.0.0
 * @ClassName Order.java
 * @Description TODO
 * @createTime 2020年10月09日 10:44:00
 */
@Data
public class Order {
    //主键
    private String id;
    //订单编号
    private String orderNumber;
    //用户id
    private Long userId;
    //用户模型
    private User user;
    //商品模型
    private ProductDetail productDetail;
    //商品id
    private String productDetailId;
    //订单总价格
    private Double totalPrice;
    //订单状态
    private OrderStatus orderStatus;
    //创建时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreated;
    //修改时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtModified;
}
